package com.wdl.modules.myhouse.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wdl.modules.myhouse.entity.UserEntity;
import com.wdl.modules.myhouse.security.entity.UserInfo;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 用户表
 *
 * @author lucain sunlightcs@gmail.com
 * @since 1.0.0 2022-08-13
 */
@Mapper
@Repository
public interface UserDao extends BaseMapper<UserEntity> {
	/**
	 * 根据邮箱号查找用户
	 * @param mail 邮箱号
	 * @return
	 */
	 UserInfo selectUserByMail(@Param("mail") String mail);
	/**
	 * 查找所有用户以及描述信息
	 * @return 以用户id为jian
	 */
	@MapKey("id")
	Map<Integer,Object> selectAllUser();
}